<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/WipDetail/wipDetailStepTwo" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="wipDetailStepTwo" />
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel" />
            <g:hiddenField name="partName1" value="${params.partName1}" />
            <g:hiddenField name="stepName1" value="${params.stepName1}" />
            <g:hiddenField name="state1" value="${params.state1}" />


          %{--  <label >批次号：</label>&nbsp;
            <input type="text" name="lotId" value="${lotId}"/>
            <label >接收人工号：</label>&nbsp;
            <input type="text" name="receiveBy" value="${receiveBy}"/>
            <label >接收人姓名：</label>&nbsp;
            <input type="text" name="receiveName" value="${receiveName}"/>--}%


            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue" onclick="javascript:bjuiExportExl('#pagerForm','${request.getContextPath()}/StageWip/exportExcel')" data-icon="file-excel-o" title="导出Excel">导出</button>&nbsp;
        </div>
    </form>
</div>

<div class="bjui-pageContent">
    <g:if test="${wipDetailStepTwo.size() > 0}">
        <table  data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr id="t1">
                <g:each in="${tableHeadList}" status="j" var="headInstance">
                    <g:if test="${headInstance!='RN'}">
                        <th  width="125"><g:message code="${headInstance}" default="${headInstance}"/></th>
                    </g:if>
                </g:each>
            </tr>
            </thead>
            <tbody>
            <g:if test="${wipDetailStepTwo.size()>0}">
                <g:each in="${wipDetailStepTwo}" status="i" var="dataInstance">
                    <tr>
                        <g:each in="${tableHeadList}" status="j" var="headInstance">
                            <g:if test="${headInstance!='RN'}">
                                <td>${dataInstance["${headInstance}"]}</td>
                            </g:if>
                        </g:each>

                    </tr>
                </g:each>
               %{-- <tr>
                    <td colspan="14">小计</td>
                    <td name="detailStepQtyShow"></td>
                </tr>
                <tr>
                    <td colspan="14">合计</td>
                    <td>${wipDetailStepSumQty.SUM_QTY[0]}</td>
                </tr>--}%

            </g:if>
            <g:else>
                <g:render template="../template/emptyPanel" />
            </g:else>
            </tbody>
        </table>
    </g:if>
</div>
<g:render template="../template/pagination" />
%{--<script>
    $(function(){
        var detailStepQty=0;
        for(var i=0;i<${wipDetailStep.size()};i++){
            var detailstepqty='DETAILSTEPQTY'+i
            var detailStepQtyAdd=$("td[name='"+detailstepqty+"']").text()==''?0:parseInt($("td[name='"+detailstepqty+"']").text())
            detailStepQty+=detailStepQtyAdd
        }
        $("td[name='detailStepQtyShow']").html(detailStepQty)

        for(var i=0;i<${wipDetailStep.size()};i++){
            var wipDetailStep="WIPDETAILSTEPTIME"+i;
            var wipDetailStepJudge=parseFloat($("td[name='"+wipDetailStep+"']").text())

            if(wipDetailStepJudge>=1&&wipDetailStepJudge<3){
                $("td[name='"+wipDetailStep+"']").css("background-color","#FFFF6F")
                $("td[name='"+wipDetailStep+"']").nextAll().css("background-color","#FFFF6F")
                $("td[name='"+wipDetailStep+"']").prevAll().css("background-color","#FFFF6F")

            }else if(wipDetailStepJudge>=3&&wipDetailStepJudge<7){
                $("td[name='"+wipDetailStep+"']").css("background-color","#FF9797")
                $("td[name='"+wipDetailStep+"']").nextAll().css("background-color","#FF9797")
                $("td[name='"+wipDetailStep+"']").prevAll().css("background-color","#FF9797")
            }else if(wipDetailStepJudge>=7){
                $("td[name='"+wipDetailStep+"']").css("background-color","#FF5151")
                $("td[name='"+wipDetailStep+"']").nextAll().css("background-color","#FF5151")
                $("td[name='"+wipDetailStep+"']").prevAll().css("background-color","#FF5151")
            }
        }
    })
</script>--}%
